package com.wu.handler;

import org.apache.log4j.Logger;
import org.springframework.context.ApplicationListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

import com.wu.receiver.UserPayReceiver;

@Component
public class UserPayHandler implements ApplicationListener<UserPayReceiver>{
	private static final Logger log = Logger.getLogger(UserPayHandler.class);
	
	@Async
	@Override
	public void onApplicationEvent(UserPayReceiver up) {
		log.info("---------支付开始啦！---------");
		System.out.println("---------支付开始啦！---------");
		System.out.println("支付ID："+up.getPayNo()+";支付信息："+up.getText());
		log.info("---------支付结束啦！---------");
		
	}

}
